package com.sgz.test.bean;

import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: sunguangzhu
 * Date: 13-8-19
 * Time: 下午4:00
 * To change this template use File | Settings | File Templates.
 */
public enum EnumBean {
    first(1),
    second(2);
    private int index;

    EnumBean(int i) {
        this.index = index;
    }

    public Map getOptions(String name) {
        Map map = new HashMap();
        for (EnumBean e : EnumBean.values()) {
            if (name == e.name()) {
                map.put(e.index, e.name());
            }
        }
        return map;
    }

    public static void main(String[] args) {

    }


}
